#include <cstdio>

#define for_loop(i,f,t) for (int i = f; i < t; ++i)


#define MAX_COORD 10001
#define MAX_BUILDINGS 5000


int max_height[MAX_COORD];


template <typename N>
inline void set_max (N &a, const N &b)
{
	if (a < b)
		a = b;
}


inline void set_heights (int l, int h, int r)
{
	++r;
	for_loop (i, l, r)
		set_max (max_height[i], h);
}


inline void first_height (int &position, int &height)
{
	height = 0;
	position = 1;
	while (max_height[position] == height)
		++position;
	height = max_height[position];
}


inline bool next_height (int &position, int &height)
{
	++position;
	while (max_height[position] == height && position < MAX_COORD)
		++position;
	if (position < MAX_COORD)
	{
		int &new_height = max_height[position];
		if (height > new_height)
			--position;
		height = new_height;
		return true;
	}
	return false;
}


int main ()
{
	int l, h, r;

	while (scanf ("%d %d %d", &l, &h, &r) == 3)
	{
		set_heights (l, h, r);
	}

	first_height (l, h);
	printf("%d %d", l, h);
	while (next_height (l, h))
		printf (" %d %d", l, h);
	putchar ('\n');

	return 0;
}